<!doctype html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<body th:fragment="tpl-tree-list" th:remove="tag">
<ul class="am-list am-list-static am-list-noborder" style="margin-left: 20px;">
    <li th:each="treeVOItem : ${treeVO.children}">
        <span th:text="${treeVOItem.name}"></span>
        <span>
            <a class="am-btn-xs am-btn am-btn-success default-btn-open-layer" th:attr="data-href=${addHref}+'?parentId='+${treeVOItem.id}"><i
                    class="am-icon-plus"></i> 新增子级</a>
            <a class="am-btn-xs am-btn am-btn-secondary default-btn-open-layer" th:attr="data-href=${editHref}+'?id='+${treeVOItem.id}">
                <i class="am-icon-edit"></i> 编辑</a>
            <a class="am-btn-xs am-btn am-btn-danger default-btn-link" th:attr="data-href=${deleteHref}+'?id='+${treeVOItem.id}">
                <i class="am-icon-minus"></i>
                删除</a>
        </span>
        <div th:if="${not #lists.isEmpty( treeVOItem.children)}"
             th:with="treeVO = ${treeVOItem}, addHref = ${addHref}, deleteHref = ${deleteHref} , editHref=${editHref}"
             th:include="framework/tpl/tpl-tree-list :: tpl-tree-list" th:remove="tag"/>
    </li>
</ul>

</body>
</html>
